<!--引导语 start-->
<div class="page-msg-red mt-20">
  <p class="title">{{guideLang.tipTitle}}</p>
  <ul>
    <li *ngFor="let item of guideLang.message.proInfo">{{item}}</li>
  </ul>
</div>
<!--引导语 end-->

<!--设置项目信息 start-->
<div nz-row class="pt-20">
  <form nz-form [formGroup]="validateForm" class="p-20">
    <nz-form-item>
      <nz-form-label [nzSm]="8" nzFor="name" nzRequired>项目名</nz-form-label>
      <nz-form-control [nzSm]="8" [nzValidateStatus]="getFormControl('name')" nzHasFeedback>
        <input nz-input formControlName="name" type="text" id="name" placeholder="请填写项目名">
        <nz-form-explain *ngIf="getFormControl('name').dirty&&getFormControl('name').errors">
          <ng-container *ngIf="getFormControl('name').hasError('required')">请填写项目名！</ng-container>
          <ng-container *ngIf="getFormControl('name').hasError('maxlength')">输入的长度不能超过50位！</ng-container>
        </nz-form-explain>
      </nz-form-control>
    </nz-form-item>

    <nz-form-item>
      <nz-form-label [nzSm]="8" nzFor="englishName" nzRequired>项目英文名</nz-form-label>
      <nz-form-control [nzSm]="8" [nzValidateStatus]="getFormControl('englishName')" nzHasFeedback>
        <input nz-input formControlName="englishName" type="text" id="englishName"
               placeholder="请填写项目英文名(与数据库一致)">
        <nz-form-explain *ngIf="getFormControl('englishName').dirty&&getFormControl('englishName').errors">
          <ng-container *ngIf="getFormControl('englishName').hasError('required')">请填写项目英文名！</ng-container>
          <ng-container *ngIf="getFormControl('englishName').hasError('maxlength')">输入的长度不能超过50位！</ng-container>
          <ng-container *ngIf="getFormControl('englishName').hasError('pattern')">请输入英文名！</ng-container>
        </nz-form-explain>
      </nz-form-control>
      <!--<nz-form-control [nzSm]="8">项目英文名将作为数据库名使用！</nz-form-control>-->
    </nz-form-item>

    <nz-form-item>
      <nz-form-label [nzSm]="8" nzFor="databaseType" nzRequired>数据库类型</nz-form-label>
      <nz-form-control [nzSm]="8" [nzValidateStatus]="getFormControl('databaseType')">
        <nz-radio-group formControlName="databaseType" id="databaseType">
          <label nz-radio [nzValue]="'Mysql'">Mysql</label>
          <label nz-radio [nzValue]="'Oracle'">Oracle</label>
          <label nz-radio [nzValue]="'MongoDB'">MongoDB</label>
        </nz-radio-group>
      </nz-form-control>
    </nz-form-item>

    <nz-form-item>
      <nz-form-label [nzSm]="8" nzFor="copyright" nzRequired>项目版权文字信息</nz-form-label>
      <nz-form-control [nzSm]="8" [nzValidateStatus]="getFormControl('copyright')" nzHasFeedback>
        <textarea rows="4" nz-input formControlName="copyright" id="copyright" placeholder="请填写项目版权文字信息"></textarea>
        <nz-form-explain *ngIf="getFormControl('copyright').dirty&&getFormControl('copyright').errors">
          <ng-container *ngIf="getFormControl('copyright').hasError('required')">请填写项目版权文字信息！</ng-container>
          <ng-container *ngIf="getFormControl('copyright').hasError('maxlength')">输入的长度不能超过500位！</ng-container>
        </nz-form-explain>
      </nz-form-control>
    </nz-form-item>

    <nz-form-item>
      <nz-form-label [nzSm]="8" nzFor="author" nzRequired>代码作者名</nz-form-label>
      <nz-form-control [nzSm]="8" [nzValidateStatus]="getFormControl('author')" nzHasFeedback>
        <input nz-input formControlName="author" type="text" id="author" placeholder="请填写代码作者名">
        <nz-form-explain *ngIf="getFormControl('author').dirty&&getFormControl('author').errors">
          <ng-container *ngIf="getFormControl('author').hasError('required')">请填写代码作者名！</ng-container>
          <ng-container *ngIf="getFormControl('author').hasError('maxlength')">输入的长度不能超过50位！</ng-container>
        </nz-form-explain>
      </nz-form-control>
    </nz-form-item>

    <nz-form-item>
      <nz-form-label [nzSm]="8" nzFor="phone" nzRequired>代码作者联系方式</nz-form-label>
      <nz-form-control [nzSm]="8" [nzValidateStatus]="getFormControl('phone')" nzHasFeedback>
        <input nz-input formControlName="phone" type="text" id="phone" placeholder="请填写代码作者联系方式">
        <nz-form-explain *ngIf="getFormControl('phone').dirty&&getFormControl('phone').errors">
          <ng-container *ngIf="getFormControl('phone').hasError('required')">请填写代码作者联系方式！</ng-container>
          <ng-container *ngIf="getFormControl('phone').hasError('maxlength')">输入的长度不能超过50位！</ng-container>
        </nz-form-explain>
      </nz-form-control>
    </nz-form-item>

    <nz-form-item>
      <nz-form-label [nzSm]="8" nzFor="language" nzRequired>项目语言</nz-form-label>
      <nz-form-control [nzSm]="8" [nzValidateStatus]="getFormControl('language')">
        <nz-radio-group id="language" formControlName="language">
          <label nz-radio [nzValue]="'java'">java</label>
          <label nz-radio [nzValue]="'js'">js</label>
          <label nz-radio [nzValue]="'python'">python</label>
        </nz-radio-group>
      </nz-form-control>
    </nz-form-item>

    <nz-form-item>
      <nz-form-label [nzSm]="8" nzFor="basePackage" nzRequired>项目基础包名</nz-form-label>
      <nz-form-control [nzSm]="8" [nzValidateStatus]="getFormControl('basePackage')" nzHasFeedback>
        <input nz-input formControlName="basePackage" type="text" id="basePackage"
               placeholder="请填写项目基础包名">
        <nz-form-explain *ngIf="getFormControl('basePackage').dirty&&getFormControl('basePackage').errors">
          <ng-container *ngIf="getFormControl('basePackage').hasError('required')">请填写项目基础包名！</ng-container>
          <ng-container *ngIf="getFormControl('basePackage').hasError('maxlength')">输入的长度不能超过50位！</ng-container>
        </nz-form-explain>
      </nz-form-control>
    </nz-form-item>

    <nz-form-item>
      <nz-form-label [nzSm]="8" nzFor="description" nzRequired>项目描述</nz-form-label>
      <nz-form-control [nzSm]="8" [nzValidateStatus]="getFormControl('description')" nzHasFeedback>
        <textarea rows="4" nz-input formControlName="description" id="description" placeholder="请填写项目描述"></textarea>
        <nz-form-explain *ngIf="getFormControl('description').dirty&&getFormControl('description').errors">
          <ng-container *ngIf="getFormControl('description').hasError('required')">请填写项目描述！</ng-container>
        </nz-form-explain>
      </nz-form-control>
    </nz-form-item>

    <div nz-row class="text-center p-20 bt">
      <button nz-button [nzType]="'default'" [nzSize]="'large'" class="thc-btn-w"
              (click)="nextStep($event,validateForm)">
        <span>保存并进入下一步</span>
      </button>
    </div>
  </form>

</div>
<!--设置项目信息 end-->
